<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--框架必需start-->
<script type="text/javascript" src="/staff_vehicle/js/jquery-1.4.js"></script>
<script type="text/javascript" src="/staff_vehicle/js/framework.js"></script>
<link href="/staff_vehicle/css/import_basic.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" id="skin" prePath="/staff_vehicle/"/>
<!--框架必需end-->

<!--截取文字start-->
<script type="text/javascript" src="/staff_vehicle/js/text/text-overflow.js"></script>
<!--截取文字end-->

<script>

/*
$(document).ready(function() {
	    $("#table_1 tr").click(function() {
		content_p = $(this).children("td:eq(2)").text();
		content_p2 = $(this).children("td:eq(4)").text();
});
});
*/
function skip_amend(index,idWhoApply,idWhoUseCar){

	//修改用车申请的状态
	//location.href="DispatchVMAction!iAgreeDispatch?idWhoApply="+idWhoApply+"&idWhoUseCar="+idWhoUseCar+"&vehicleId="+?+"&driverId="+?;
	
    	top.Dialog.open({URL:"dispatchVM!viewOneApplyCar?idWhoApply="+idWhoApply+"&index="+index+"&idWhoUseCar="+idWhoUseCar,Title:"员工信息修改",
		Title : "车辆派发",
		Width : 1200,
    	Height : 500,});
}
/*
$(document).ready(function(){

			$("#table_1 td input[alt='agree']").click(function() {
				var content_p = $(this).parent().parent().children("td:eq(2)").text();
				var content_p2 = $(this).parent().parent().children("td:eq(4)").text();
				
				top.Dialog.open({
		    		URL : "admin/dispatch_car.jsp?content_p=" + content_p + "&content_p2=" + content_p2,
		    		Title : "车辆派发",
		    		Width : 1200,
		    		Height : 500,
				});
			});
			
			
			
			$("#table_1 td input[alt='disagree']").click(function() {
				alert("######");
			});
	});

*/

function skip_decline(idstaffApplyCar){
	top.Dialog.confirm("确定要拒绝吗",function(){window.location="dispatchVM!iDisAgreeDispatch?idstaffApplyCar="+idstaffApplyCar});
}

</script>
</head>
<body>

	<div id="scrollContent" class="border_gray">
		<table class="tableStyle" id="table_1">
			<tr>
				<th width="8%">申请人ID</th>
				<th width="10%">使用人ID</th>
				<th width="20%">使用时间</th>
				<th width="10%">申请人电话</th>
				<th width="10%">使用者电话</th>
				<th width="15%">原因</th>
				<th width="17%">操作</th>
			</tr>
			<s:iterator value="staffAMPDataList" var="st">
				<tr>
					<td><s:property value="staffApplyCar.staffId" />
						</td>
						<td><s:property value="staffApplyCar.usercarStaffid " />
						</td>
						<td><s:date name="staffApplyCar.duration" format="yyyy-MM-dd hh:mm:ss"/>
						</td>
						<td><s:property value="applyCarStaff.staffTel" />
						</td>
						<td><s:property value="useCarStaff.staffTel" />
						</td>
						<td><s:property value="staffApplyCar.applyReason" />
						</td>
						<td><input alt="agree" type="button" value="同意" onclick="skip_amend('${status.index}','${staffApplyCar.staffId}','${staffApplyCar.usercarStaffid}')"/>
						<input alt="disagree" type="button" value="拒绝" onclick="skip_decline('${staffApplyCar.idstaffApplyCar}')" />
					</td>
				</tr>
			</s:iterator>
		</table>
	</div>

	<div style="height:35px;">
		<div class="float_left padding5"></div>
		<div class="float_right padding5 paging">
			<div class="float_left padding_top4">
				<span class="paging_disabled"><a href="javascript:;">上一页</a>
				</span> <span class="paging_current"><a href="javascript:;">1</a>
				</span> <span><a href="javascript:;">2</a>
				</span> <span><a href="javascript:;">3</a>
				</span> <span><a href="javascript:;">4</a>
				</span> <span><a href="javascript:;">5</a>
				</span> <span>...</span> <span><a href="javascript:;">20</a>
				</span> <span><a href="javascript:;">下一页</a>
				</span>&nbsp;每页
			</div>
			<div class="float_left">
				<select autoWidth="true"><option>50</option>
					<option>100</option>
					<option>150</option>
				</select>
			</div>
			<div class="float_left padding_top4">条记录</div>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
	</div>
</body>
</html>